﻿public class NetHandler_WhiteList : NetMessageHandler
{
    public const string Key = "WhiteList";

    public static NetHandler_WhiteList NewHandler()
    {
        return new NetHandler_WhiteList();
    }

    protected override ISerialize NewData() => new WhiteListData();

    public override void Execute(Remote client, ISerialize _data)
    {
        WhiteListData data = _data as WhiteListData;

        GameDebug.Log($"Master  请求设置白名单：{data.whiteList?.GetListStr()}  ");

        ResponseData response = new ResponseData();
        response.code = 0;

        Game.instance.data.whiteListData = data;

        byte[] senddata = response.Write();

        this.SendResponse(client, Key, this.m_MessageReceived.seq, senddata);
    }
}